if exists (select 1
            from  sysobjects
           where  id = object_id('bd_view_entourage')
            and   type = 'V')
   drop view bd_view_entourage
go

create view bd_view_entourage as
 select visit_order_id,
        STUFF(
        (
        SELECT
        ','+follow_name
        from bd_visit_order_follow t2
        WHERE t1.visit_order_id=t2.visit_order_id FOR XML PATH('')
        )
        ,1,1,'')info
        from bd_visit_order_follow t1
        GROUP by visit_order_id